package net.devkit.core.pojo.db;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import net.devkit.core.pojo.DevCommandPOJO;

import org.hibernate.annotations.GenericGenerator;


/**
 * The persistent class for the loginlog database table.
 * 
 */
@Entity
@Table(name="loginlog")
public class Loginlog extends DevCommandPOJO<Loginlog> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2513208478504799907L;
	private String id;
	private String loginIp;
	private short loginResult;
	private Date loginTime;
	private String userId;

    public Loginlog() {
    }


	@Id
	@Column(unique=true, nullable=false, length=36)
	@GenericGenerator(name = "generator", strategy = "org.hibernate.id.UUIDGenerator")
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}


	@Column(name="LOGIN_IP", nullable=false, length=50)
	public String getLoginIp() {
		return this.loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}


	@Column(name="LOGIN_RESULT", nullable=false)
	public short getLoginResult() {
		return this.loginResult;
	}

	public void setLoginResult(short loginResult) {
		this.loginResult = loginResult;
	}


    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LOGIN_TIME", nullable=false)
	public Date getLoginTime() {
		return this.loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}


	@Column(name="USER_ID", length=255)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Override
	public int compareTo(Loginlog o) {
		// TODO Auto-generated method stub
		return 0;
	}

}